package {
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	import isogame.Data;
	import isogame.Event.DataEvent;
	import isogame.Tile;
	import isogame.XmlParser;
	
	public class yoyuulako extends Sprite {	
		
		public var d:Data;
		
		public function yoyuulako(){
			
			var xml:XmlParser = new XmlParser("../tmp/map.xml");
			
			var data:Array = new Array();
			data.push("../tmp/aaa.jpg");
			data.push("../tmp/aaa.jpg");
			
			d= new Data(data);
			d.addEventListener(DataEvent.SUCCESS, add);
		}
		
		public function add(evnt:Event):void{
			//map
			var t:Tile = new Tile(500,500, d.dataHolder["../tmp/aaa.jpg"]);
			var t1:Tile = new Tile(50,50, d.dataHolder["../tmp/aaa.jpg"]);
			t.x = 100;
			t.y = 100;
			t1.x = 150;
			t1.y = 125;
			addChild(t);
			addChild(t1);
		}
		
		
	}
}
